<?php

	/**
	* SmartTemplate Extension regex
	* Regular Expression String Replace
	*
	* Usage Example:
	* Content:  $template->assign('NAME', '*My Document*');
	* Template: Document Name: {regex:NAME,'/[^a-z0-9]/i','_'}
	* Result:   Document Name: _My_Document_
	*
	* @author Philipp v. Criegern philipp@criegern.com
	*/
	function smarttemplate_extension_clean_comment ( $data )
	{
		//$returndata =  preg_replace( "/\n/is", "", $param );
		$data = preg_replace( "/\r\n/is", "", $data );
		$data = preg_replace( "/<br\s\/>\s+/is", "<br \>", $data );
		//$data = preg_replace( "/\n\r/is", "", $data );

		return $data ;
	}

?>